﻿#region License statement
// NJamb, a specification and delta-specification DSL
// Copyright (c) 2010-2011, Mark Knell
// Published under the MIT License; all other rights reserved
#endregion

#region using...
using NUnit.Framework;
using Stile.Testing.SampleTypes;
#endregion

namespace NJamb.NUnit.Tests
{
    [TestFixture]
    public class SampleBDDFixture : BDDFixtureBase<Sample>
    {
        private Sample _sample;

        [Test]
        public void Exercise()
        {
            TestSubject = new Sample(-9) {String = "s"};

            Given(ThatTheSequence(x => x.IntEnumerable).Is.Empty.AndLater.Has.CountOf(1));
            When(x => x.AddToEnumerable(5));
            Then(() => Assert.That(TestSubject.String, Is.InstanceOf(typeof(string))));
        }

        protected override Sample TestSubjectFactory()
        {
            _sample = new Sample();
            return _sample;
        }
    }
}
